package com.uphone.edwards.pro.activity.login;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.LinearLayout;

import com.radish.baselibrary.Intent.IntentUtils;
import com.uphone.edwards.R;
import com.uphone.edwards.pro.activity.login.catalogue.CataLogueActivity;
import com.uphone.edwards.util.LanguageUtils;
import com.uphone.edwards.util.SharedUtils;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class HandbookContentActivity extends AppCompatActivity {

    @BindView(R.id.ll_to_conrents)
    LinearLayout llToConrents;
    @BindView(R.id.ll_finish)
    LinearLayout llFinish;

    @Override
    protected void attachBaseContext(Context newBase) {
        //获取我们存储的语言环境 比如 "en","zh",等等
        /**
         * attach对应语言环境下的context
         */
        String lang = SharedUtils.getShareLanguage(newBase);
        super.attachBaseContext(LanguageUtils.attachBaseContext(newBase, lang));

    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_handbook_content);
        ButterKnife.bind(this);
    }


    @OnClick({R.id.ll_to_conrents , R.id.ll_finish})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.ll_to_conrents:
                IntentUtils.getInstance()
                        .with(this, CataLogueActivity.class)
                        .start();
                break;

                case R.id.ll_finish:
                finish();
                break;
        }
    }

}
